#include "workerthread.h"
#include <QDebug>

WorkerThread::WorkerThread()
{

}


void WorkerThread::run()
{
    qDebug() << "WorkerThread started:"
             << QThread::currentThreadId();
    timer =  new QTimer();
    connect(timer,&QTimer::timeout,this,[=](){
            qDebug()<<QStringLiteral("定时器超时了");
    });
    timer->start(1000);
   exec();
    delete timer;
    qDebug() <<QStringLiteral("任务完成正常退出")
             << QThread::currentThreadId();
}
